package com.spzx.order.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spzx.order.domain.OrderForm;
import com.spzx.order.api.domain.OrderInfo;
import com.spzx.order.domain.TradeVo;

/**
 * 订单Service接口
 *
 * @author atguigu
 * @date 2024-08-31
 */
public interface IOrderInfoService extends IService<OrderInfo>
{

    /**
     * 查询订单列表
     *
     * @param orderInfo 订单
     * @return 订单集合
     */
    public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);

    /**
     * 查询订单
     *
     * @param id 订单主键
     * @return 订单
     */
    public OrderInfo selectOrderInfoById(Long id);

    //=====================前台接口管理==========================
    //订单结算
    TradeVo orderTradeData();

    //用户提交订单
    Long submitOrder(OrderForm orderForm);

    //立即购买
    TradeVo buy(Long skuId);

    //获取用户订单分页列表
    List<OrderInfo> selectUserOrderInfoList(Integer orderStatus);

    // //延迟关闭订单消费者
    void processCloseOrder(long orderId);

    //取消订单
    void cancelOrder(Long orderId);

    //根据订单号获取订单信息
    OrderInfo getByOrderNo(String orderNo);
}
